package ess.control;

public class ElevatorStateMoving extends ElevatorState {

	public ElevatorStateMoving(ElevatorProxy proxy) {
		super(proxy, STATE_MOVING);
	}

	public void processState() {
		proxy.move();
	}

	public ElevatorState handleCommand(Command c) {
		if(c.equals(Command.COMMAND_STOP))
		{
			return proxy.getState(STATE_STOPPED);
		}
		return null;
	}

}
